package com.junit;

import junit.framework.TestCase;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.rcd.manager.dao.IReviewManagerDao;
import com.rcd.vo.Review;

public class IReviewDaoImplTest extends TestCase 
{
	ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext-*.xml");
	IReviewManagerDao reviewManagerDao = (IReviewManagerDao)applicationContext.getBean("reviewManagerDao");
	
	public void testAddReview()
	{
		Review review = new Review();
		review.setRcontent("Hello World!");
		review.setRlevel(3);
		review.setPid(1);
		review.setUid(2);
		
		reviewManagerDao.addReview(review);
	}
	
	public void testUpdateReview()
	{
		Review review = new Review();
		review.setRid(2);
		review.setRcontent("Hello");
		review.setRlevel(3);
		review.setPid(1);
		review.setUid(2);
		
		reviewManagerDao.updateReview(review);
	}
	
	public void testDelReview()
	{
		Review review = new Review();
		review.setRid(1);
		reviewManagerDao.delReview(review);
	}
	
	public void testFindReviewByPid()
	{
		
	}
	
	public void testFindReviewByUid()
	{
		
	}
	
	public void testGetAllSize()
	{
		
	}
}